package com.scs.application.modules.msg.service;

import com.scs.application.modules.msg.dto.PushDTO;
import com.scs.application.modules.msg.model.EmailMessage;
import com.scs.application.modules.msg.model.InnerNoticeMessage;
import com.scs.application.modules.msg.model.SmsMessage;
import org.springframework.scheduling.annotation.Async;
import org.springframework.transaction.annotation.Transactional;

/**
 */
public interface PushService {

    void pushSms(SmsMessage message);

    void pushEmail(EmailMessage message);

    void pushInnerNotice(InnerNoticeMessage message);

    void pushByDTO(PushDTO pushDTO);

    void pushMessage(PushDTO pushDTO);

    @Transactional(rollbackFor = Exception.class)
    @Async
    void pushMessageAsync(PushDTO pushDTO);
}
